package views;

import java.awt.*;

import javax.swing.*;

import config.ProFileAdmin;
import data.InitData;
import business.Function;
import business.MessageAdmin;
import business.Start;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class BaseDialog extends JDialog {
   // JPanel panel1 = new JPanel();
    //BorderLayout borderLayout1 = new BorderLayout();
      ProFileAdmin config = new ProFileAdmin();
    //public boolean success;
    //Start start = new Start();
  	private final int SizeX = 1000;
	private final int SizeY = 670;
	private int LocalX = 0;
	private int LocalY = 0;
      
    public BaseDialog(Frame owner, String title, boolean modal) {
        super(owner, title, modal);
        try {
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            jbInit();
            pack();
        } catch (Exception exception) {
            exception.printStackTrace();
        }
    }

    public BaseDialog(Dialog owner, String title, boolean modal) {
           super(owner, title, modal);
           try {
               setDefaultCloseOperation(DISPOSE_ON_CLOSE);
               jbInit();
               pack();
           } catch (Exception exception) {
               exception.printStackTrace();
           }
    }
    public BaseDialog() {
        this(new Frame(), "BaseDialog", false);
    }
    private void jbInit() throws Exception {
    	System.currentTimeMillis();
    	
		this.setSize(900,680);
		this.LocalX = (InitData.getRealWIDTH() - Function.getY(SizeX))/2;
		this.LocalY = (InitData.getRealHEIGHT() - Function.getY(SizeY))/2;
		this.setLocation(this.LocalX,this.LocalY);
		this.setResizable(false);
    	
       // panel1.setLayout(borderLayout1);
        //getContentPane().add(panel1);
    }

}
